package com.woniu.apiimpl;

import com.woniu.hisoutpatientservicefacade.api.OutpatientServiceAPI;
import com.woniu.hisoutpatientservicefacade.dto.LoginDto;
import com.woniu.hisoutpatientservicefacade.dto.QueryMedicalRecordParam;
import com.woniu.hisoutpatientservicefacade.dto.ViewInspectionResultsDto;
import com.woniu.hisoutpatientservicefacade.param.*;
import com.woniu.service.OutpatientServiceService;
import com.woniu.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/outpatient-service")
public class OutpatientServiceAPIImpl implements OutpatientServiceAPI {

    @Resource
    private OutpatientServiceService outpatientService;

    @Override
    public Result<LoginDto> login(LoginParam param) {
        return Result.bulid(LoginDto.class).setData(outpatientService.login(param));
    }

    @Override
    public Result register(RegisterParam param) {
        return outpatientService.register(param);
    }

    @Override
    public Result queryOffice() {
        return outpatientService.queryOffice();
    }

    @Override
    public Result querySchedulingInfo(Integer officeId) {
        return querySchedulingInfo(officeId);
    }

    @Override
    public Result queryDoctor(Integer doctorId) {
        return outpatientService.queryDoctor(doctorId);
    }

    @Override
    public Result payment(Integer registerId) {
        return outpatientService.payment(registerId);
    }

    @Override
    public Result paymentCallback() {
        return outpatientService.paymentCallback();
    }

    @Override
    public Result queryPatientCohort(QueryPatientCohortParam param) {
        return outpatientService.queryPatientCohort(param);
    }

    @Override
    public Result skipPatient(Integer patientId) {
        return outpatientService.skipPatient(patientId);
    }

    @Override
    public Result queryOfficePatientCohort(Integer officeId) {
        return outpatientService.queryOfficePatientCohort(officeId);
    }

    @Override
    public Result queryMedicalRecord(QueryMedicalRecordParam param) {
        return outpatientService.queryMedicalRecord(param);
    }

    @Override
    public Result generateMedicalRecord(GenerateMedicalRecordParam param) {
        return outpatientService.generateMedicalRecord(param);
    }

    @Override
    public Result viewMedicalRecord(Integer caseId) {
        return outpatientService.viewMedicalRecord(caseId);
    }

    @Override
    public Result viewInspectionItems() {
        return outpatientService.viewInspectionItems();
    }

    @Override
    public Result generateChecklist(GenerateChecklistParam param) {
        return outpatientService.generateChecklist(param);
    }

    @Override
    public Result<ViewInspectionResultsDto> viewInspectionResults(ViewInspectionResultsParam param) {
        return Result.bulid(ViewInspectionResultsDto.class).setData(outpatientService.viewInspectionResults(param));
    }

    @Override
    public Result queryMedicineName(String medicineName) {
        return outpatientService.queryMedicineName(medicineName);
    }

    @Override
    public Result generateDrugOrder(GenerateDrugOrderParam param) {
        return outpatientService.generateDrugOrder(param);
    }

    @Override
    public Result queryDrugOrder(Integer careId) {
        return outpatientService.queryDrugOrder(careId);
    }

    @Override
    public Result tollDrugOrder(Integer careId) {
        return outpatientService.tollDrugOrder(careId);
    }

    @Override
    public Result tollDrugOrderCallback() {
        return outpatientService.tollDrugOrderCallback();
    }

    @Override
    public Result takeMedicine(Integer careId) {
        return outpatientService.takeMedicine(careId);
    }

    @Override
    public Result applyForHospitalization(PatientDetailsParam param) {
        return outpatientService.applyForHospitalization(param);
    }
}
